#!/usr/bin/env python
# -*-coding:utf-8-*-
# File    : liyuqi.py
# Date    : 2021-01-27
# Author  : Tom.Lee


dict1 = {'a': 10, 'b': 8, 'd': 7}

dict2 = {'d': 6, 'c': 4}

# print(dict(dict1,**dict2))

for k, v in dict2.items():
    if k not in dict1:
        dict1[k] = v
    elif v > dict1[k]:
        dict1[k] = v



print(dict1)



